#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:4_encapsulated_student.py
# author:张世航
# datetime:2024/11/10 17:23
# software: PyCharm
"""
this is function  description 
"""
# import module your need

# 四 .封装一个学生类，有姓名，有年龄，有性别，有英语成绩，数学成绩，语文成绩，
#       封装方法，求单个学生的总分，平均分，以及打印学生的信息。

class Student:
    def __init__(self, name, age, gender, english, math, chinese):
        self.name = name
        self.age = age
        self.gender = gender
        self.english = english
        self.math = math
        self.chinese = chinese

    def get_total_score(self):
        return self.english + self.math + self.chinese

    def get_average_score(self):
        return self.get_total_score() / 3

    def print_info(self):
        print(f"Name: {self.name}, Age: {self.age}, Gender: {self.gender}")
        print(f"English: {self.english}, Math: {self.math}, Chinese: {self.chinese}")
        print(f"Total Score: {self.get_total_score()}, Average Score: {self.get_average_score()}")

# 测试
student = Student("Alice", 18, "female", 85, 90, 88)
student.print_info()